import request from "@/utils/request";

export function createOrder(goods_id){
    return request({
        url:'/api/orders',
        method:"post",
        data: {"goods_id":goods_id}
    })
}

export function getOrder(order_id)
{
    return request({
        url:'/api/orders/'+order_id,
        method:'get',
    })
}

export function myOrder(page)
{
    return request({
        url:'/api/orders',
        method:"get",
        data:{page:page}
    })
}

export function confirm(order_id){
    return request({
        url:'/api/orders/'+order_id+'/confirm',
        method:"post"
    })
}

export function send(order_id,content){
    return request({
        url:'/api/orders/'+order_id+'/send',
        method:"post",
        data:{content:content}
    })
}

export function waitSendList(){
    return request({
        url:'/api/orders/wait-send',
        method:"get",
    })
}

